1. Piecewise defined functions.
Some interesting things occur when you evaluate limits of piecewise defined functions. In Maple, an example of a piecewise defined function is:
> f:= x->piecewise(x<-1,-x^3,x>-1,(x+2)^2,x=-1,`undefined`);
> f(x);
We plot the function over the domain
.
> plot(f(x),x=-2..1,y=0..8,thickness=2);
Look up the command in Maple, and use it to define the piecewise function
f
in the
Submission
section. Plot the function
over a domain which illustrates the piecewise nature of the function definition. You will want to use the option
discont=true
for this plot. What this option does is to inform Maple to watch out for "discontinuities" or " jumps" in the graph.
Submission:
Use piecewise to plot the piecewise defined function
if
is less than
, and
if
is greater than or equal to
, then:
(a) Find
and
.
(b) Does
exist?
Submission worksheet:
Define the function
in Maple by
> f := x-> piecewise(x < 0,x^2+.1e-3,0 <= x,x^2-.1e-3);
> f(x);
From the following graph, we might guess that the limit as of
is 0.
> plot(f(x),x=-1..1);
We want to see what
-
definition of the limit will say about this educated guess.
Choose
and plot to find a
such that if
, then
. Then do the same thing for
, .001, .0001, etc. If the limit does not exist, then for some
, you won't be able to find a
.
We do the case
for you, where by trial and error we found that
seems to work.
> epsilon:=0.1;delta:=.32;plot([-epsilon,epsilon,f(x)],x=-delta..delta,color=[red,red,blue],axes=boxed);
Submission:
Plots like the one above for
=0.1, 0.05, 0.001, 0.0005, etc. If for some
we cannot find a
, then the limit is not 0.
Explain this last point carefully.
Also, answer these questions:
(a)
What is the left hand limit as
?
(b)
What is the right hand limit at
?
(c)
Is
continuous from the right at
?
(d)
Is
continuous from the left at
?
(e)
Is
continuous at
?
Submission worksheet:
3. Using Maple to study continuity.
The function given by the rule
> f:=x->(x^2-1)/(x-1);
is not defined at
, as we can check in Maple.
> f(1);
Error, (in f) numeric exception: division by zero
Nevertheless, we can extend the definition of the function by defining f(1) to be equal to a certain value which will make the function continuous.
To investigate which value we should use to extend the function to make it continuous at
, we can evaluate the limit, either graphically, as
> plot(f,0..2);
from which it appears that the value
will extend it to a continuous function, or we can evaluate the limit using Maple.
> limit(f(x),x=1);
Whenever
exists, we can define
, and the function so redefined will be continuous at
. Thus the function given by
> f:=x->piecewise(x<>1,(x^2-1)/(x-1),x=1,2);
> f(x);
will be continuous at
because
. Let us check that with Maple.
> limit(f(x),x=1);
However, due to a bug in Maple's evaluation of the piecewise function, it does not evaluate f(1) correctly.
> f(1);
Error, (in f) numeric exception: division by zero
This type of error is not too common in Maple, but it does illustrate that you have to keep your eyes open whenever you are using a piece of software, because you don't know exactly how it works, and so can't be sure that it is always correct.
Submission:
Use the method outlined above to study the following functions. (There is no zoom and trace feature in Maple, so try to estimate the limits by clicking on the point on the graph and looking at the left top part of the screen, where the approximate coordinates of the point will appear. Then compare your estimates with the exact values given by the limit command)
(a)
,
(b)
,
(c)
,
(d)
,
Submission worksheet: